<script setup>
	import { h } from 'vue'
	import { SendOutlined } from '@ant-design/icons-vue'
	import workflowContentApi from '@/api/workflow/workflowContentApi.js'
	import $bus from '@/utils/mitt.js';
	const keywords = ref('')

	// 定义要触发的事件

	const pressEnter = async () => {
		let d = await workflowContentApi.aiGenerateProcessFile({
			aiCode: 'zhipuai',
			keywords: keywords.value
		})
		$bus.emit('processReloadJsonEvent',d);
	}
</script>

<template>
	<a-row class="mb-2">
		<a-col :span="24">
			<a-textarea
				v-model:value="keywords"
				placeholder="请输入问题"
				:auto-size="{ minRows: 12, maxRows: 15 }"
			></a-textarea>
		</a-col>
	</a-row>
	<a-row>
		<a-col :span="3">
			<a-button type="primary" :icon="h(SendOutlined)" @click="pressEnter">发送</a-button>
		</a-col>
	</a-row>
</template>

<style scoped lang="less"></style>
